package com.zhfj.entity;

import javax.persistence.*;
import java.util.Date;

/**
 * Created on 2017/11/30.
 *
 * @author Jie
 */
@Entity
@Table(name = "TopicIncludeArticle", schema = "EasyBlog", catalog = "")
public class TopicIncludeArticleEntity {
    private Integer id;
    private Integer topicId;
    private Integer articleId;
    private Date includeDate;
    private Integer articleHotSign;

    @Id
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "topic_id")
    public Integer getTopicId() {
        return topicId;
    }

    public void setTopicId(Integer topicId) {
        this.topicId = topicId;
    }

    @Basic
    @Column(name = "article_id")
    public Integer getArticleId() {
        return articleId;
    }

    public void setArticleId(Integer articleId) {
        this.articleId = articleId;
    }

    @Basic
    @Column(name = "include_date")
    public Date getIncludeDate() {
        return includeDate;
    }

    public void setIncludeDate(Date includeDate) {
        this.includeDate = includeDate;
    }

    @Basic
    @Column(name = "article_hot_sign")
    public Integer getArticleHotSign() {
        return articleHotSign;
    }

    public void setArticleHotSign(Integer articleHotSign) {
        this.articleHotSign = articleHotSign;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TopicIncludeArticleEntity that = (TopicIncludeArticleEntity) o;

        if (id != that.id) return false;
        if (topicId != null ? !topicId.equals(that.topicId) : that.topicId != null) return false;
        if (articleId != null ? !articleId.equals(that.articleId) : that.articleId != null) return false;
        if (includeDate != null ? !includeDate.equals(that.includeDate) : that.includeDate != null) return false;
        if (articleHotSign != null ? !articleHotSign.equals(that.articleHotSign) : that.articleHotSign != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (topicId != null ? topicId.hashCode() : 0);
        result = 31 * result + (articleId != null ? articleId.hashCode() : 0);
        result = 31 * result + (includeDate != null ? includeDate.hashCode() : 0);
        result = 31 * result + (articleHotSign != null ? articleHotSign.hashCode() : 0);
        return result;
    }
}
